#ifndef REQUEST_SERVER_HH
# define REQUEST_SERVER_HH

//std includes
# include <string>
# include <list>

//booby includes
# include "request-handler-server.hh"
# include <math/vector.hh>

//server std::list<std::pair<Client*,Request> >


//to put in common
class Request
{
public:
  virtual ~Request() {}

  virtual void operator() (RequestHandler* rh) = 0;
};
//end to put in common

class Connection: public Request
{
public:
  Connection (const std::string& netstr);

  virtual void operator() (RequestHandler* rh);

  const std::string& login() const;
  const std::string& pwd() const;

protected:
  std::string login_;
  std::string pwd_;
};

class Disconnection: public Request
{
};

class Info: public Request
{
public:

  virtual void operator() (RequestHandler* rh);

protected:
  //to fill
};

class Map: public Request
{
public:
  virtual void operator() (RequestHandler* rh);
};

class Object: public Request
{
public:
  virtual void operator() (RequestHandler* rh);
};

class Text: public Request
{
public:
  Text (const std::string& netstr);

  virtual void operator() (RequestHandler* rh);

  const std::string& text () const;
protected:
  std::string text_;
};

class Move: public Request
{
public:
  Move (const std::string& netstr);

  virtual void operator() (RequestHandler* rh);

  const std::list<int>& objid () const;
  const Vector3f& move () const;

protected:
  std::list<int> objid_;
  Vector3f move_;
};

//plus add fire, pathfinding

#endif /// !REQUEST_SERVER_HH
